From: Georges Basile Stavracas Neto Date: Sat, 28 Oct 2023 22:14:39 +0000 (-0300) Subject: screenshot: Make captureScreenshot() return the GFile X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~2^2~211 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=52a7ee7590f4fffa0a9fb671763ef35174941fab;p=gnome-shell.git screenshot: Make captureScreenshot() return the GFile Make the captureScreenshot() auxiliary function return the GFile at which the texture was saved. This file will be used to return the screenshot URI to the new D-Bus method to take interactive screenshots. Part-of: --- diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index 8875d9325..cfd5fbd85 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -2279,6 +2279,8 @@ function _storeScreenshot(bytes, pixbuf) { notification.setTransient(true); Main.messageTray.add(source); source.showNotification(notification); + + return file; } /** @@ -2312,7 +2314,7 @@ export async function captureScreenshot(texture, geometry, scale, cursor) { ); stream.close(null); - _storeScreenshot(stream.steal_as_bytes(), pixbuf); + return _storeScreenshot(stream.steal_as_bytes(), pixbuf); } /**